package com.lagou.edu.support;

import java.util.*;

/**
 * @author liangzj
 * @date 2021/4/7 21:34
 */
public class Server {

    // 一个Catalina包含多个service
    private static final List<Service> SERVICES = new ArrayList<>(10);

    public void startup() {
        // 启动多个service
        for (Service service : SERVICES) {
            service.start();
        }
    }

    public void addService(Service service) {
        SERVICES.add(service);
    }

}
